emacs.git
8 years agoVersion 3.1.0
Justin Burkett [Tue, 9 Jan 2018 01:19:10 +0000 (20:19 -0500)]
Version 3.1.0

8 years agoFix and improve define-key based replacements
Justin Burkett [Mon, 18 Dec 2017 03:16:24 +0000 (22:16 -0500)]
Fix and improve define-key based replacements

Check for equality of definition as well as the key sequence. Unless it's a
prefix binding, in which case only check the key sequence.

Make sure we apply kbd when looking up pseudo bindings.

Move the logic into which-key--get-pseudo-binding.

8 years agoMerge pull request #183 from tarsiiformes/silencio
Justin Burkett [Sun, 17 Dec 2017 18:17:13 +0000 (13:17 -0500)]
Merge pull request #183 from tarsiiformes/silencio

Define which-key--current-key-list before using it

8 years agoDefine which-key--current-key-list before using it
Jonas Bernoulli [Sun, 17 Dec 2017 17:57:03 +0000 (18:57 +0100)]
Define which-key--current-key-list before using it

Actually move the definition of the caller which-key--pseudo-key
instead.

8 years agoSimplify implementation of define-key based replacements
Justin Burkett [Sun, 17 Dec 2017 03:11:59 +0000 (22:11 -0500)]
Simplify implementation of define-key based replacements

When a description is provided through define-key using a definition
like ("description" . def) place a additional binding in the map to a "pseudo
key" making it easy for which-key to find these descriptions on the fly and at
the right time (i.e., when the binding is active).

which-key-enable-extended-define-key must be enabled for this to have an
effect.

8 years agoImprove which-key--process-define-key-args
Justin Burkett [Fri, 15 Dec 2017 19:18:30 +0000 (14:18 -0500)]
Improve which-key--process-define-key-args

Specify Prefix Command as an explicit match string to cut down on false
positives.

8 years agoAnnounce which-key-enable-extended-define-key in README
Justin Burkett [Thu, 14 Dec 2017 02:12:50 +0000 (21:12 -0500)]
Announce which-key-enable-extended-define-key in README

8 years agoDemote errors in which-key--process-define-key-args
Justin Burkett [Thu, 14 Dec 2017 01:52:09 +0000 (20:52 -0500)]
Demote errors in which-key--process-define-key-args

8 years agoFix .travis.yml
Justin Burkett [Wed, 13 Dec 2017 18:06:55 +0000 (13:06 -0500)]
Fix .travis.yml

Didn't install cask

8 years agoFix travis build
Justin Burkett [Wed, 13 Dec 2017 18:02:51 +0000 (13:02 -0500)]
Fix travis build

Add support for 25.3. Remove for 24.3

8 years agoAllow null DEF in which-key--process-define-key-args
Justin Burkett [Wed, 13 Dec 2017 16:10:05 +0000 (11:10 -0500)]
Allow null DEF in which-key--process-define-key-args

This is useful for naming prefixes

8 years agoAdd which-key-enable-extended-define-key customization option
Justin Burkett [Wed, 13 Dec 2017 15:56:25 +0000 (10:56 -0500)]
Add which-key-enable-extended-define-key customization option

Adds supporting which-key--process-define-key-args.

The docstring for the option is

Advise `define-key' to make which-key aware of definitions of the form

  (define-key KEYMAP KEY '("DESCRIPTION" . DEF))

With the advice, this definition will have the side effect of creating a
replacement in `which-key-replacement-alist' that replaces DEF with DESCRIPTION
when the key sequence ends in KEY. Using a cons cell like this is a valid
definition for `define-key'. All this does is to make which-key aware of it.

Since many higher level keybinding functions use `define-key' internally, this
will affect most if not all of those as well.

This variable must be set before loading which-key.

8 years agoFix ordering of default replacement-alist
Justin Burkett [Thu, 7 Dec 2017 22:30:49 +0000 (17:30 -0500)]
Fix ordering of default replacement-alist

When which-key-allow-multiple-replacements is nil, this order is required to get
the intended behavior with left and right.

Ref #181

8 years agoAdd notes about paging commands not working with minibuffer
Justin Burkett [Tue, 5 Dec 2017 12:17:47 +0000 (07:17 -0500)]
Add notes about paging commands not working with minibuffer

8 years agoRe-indent README
Justin Burkett [Tue, 14 Nov 2017 15:10:43 +0000 (10:10 -0500)]
Re-indent README

8 years agoMention which-key-show-major-mode in README
Justin Burkett [Tue, 14 Nov 2017 15:04:31 +0000 (10:04 -0500)]
Mention which-key-show-major-mode in README

8 years agoConsolidate use of binding filters
Justin Burkett [Tue, 14 Nov 2017 15:00:14 +0000 (10:00 -0500)]
Consolidate use of binding filters

8 years agoImprove echo area note for which-key-show-major-mode
Justin Burkett [Tue, 14 Nov 2017 14:52:37 +0000 (09:52 -0500)]
Improve echo area note for which-key-show-major-mode

8 years agoAdd which-key-show-major-mode
Justin Burkett [Mon, 13 Nov 2017 20:17:16 +0000 (15:17 -0500)]
Add which-key-show-major-mode

This is a new function to discover bindings, including evil ones, in the keymap
of the current major mode. It should be considered experimental at the moment.

8 years agoUpdate which-key version for GNU ELPA
Justin Burkett [Thu, 17 Aug 2017 18:07:50 +0000 (14:07 -0400)]
Update which-key version for GNU ELPA

8 years agoMake minor changes to commentary in which-key.el
Justin Burkett [Wed, 9 Aug 2017 00:05:37 +0000 (20:05 -0400)]
Make minor changes to commentary in which-key.el

8 years agoAssign copyright to FSF for ELPA
Justin Burkett [Mon, 7 Aug 2017 20:27:12 +0000 (16:27 -0400)]
Assign copyright to FSF for ELPA

8 years agoFix which-key-show-remaining-keys option
Justin Burkett [Tue, 30 May 2017 12:25:52 +0000 (08:25 -0400)]
Fix which-key-show-remaining-keys option

8 years agoVersion 3.0.1
Justin Burkett [Sun, 28 May 2017 14:06:07 +0000 (10:06 -0400)]
Version 3.0.1

8 years agoHandle C-h when buffer not showing
Justin Burkett [Sat, 27 May 2017 19:34:54 +0000 (15:34 -0400)]
Handle C-h when buffer not showing

which-key-C-h-dispatch was not doing anything different if the which-key buffer
was not showing. This makes it fall back to the standard Emacs behavior.

Fixes #172

8 years agoMerge pull request #171 from wyuenho/patch-1
Justin Burkett [Sun, 21 May 2017 12:49:54 +0000 (08:49 -0400)]
Merge pull request #171 from wyuenho/patch-1

Customize which-key-sort-order with list

8 years agoCustomize which-key-sort-order with list
Jimmy Yuen Ho Wong [Sat, 20 May 2017 22:46:12 +0000 (23:46 +0100)]
Customize which-key-sort-order with list

This will display a list the user can choose from in customize instead of having them to type

8 years agoAdhere to 80 chars per column
Justin Burkett [Fri, 19 May 2017 21:55:13 +0000 (17:55 -0400)]
Adhere to 80 chars per column

8 years agoUse regexp-opt for regexps
Justin Burkett [Fri, 19 May 2017 21:53:43 +0000 (17:53 -0400)]
Use regexp-opt for regexps

* which-key.el (which-key--get-keymap-bindings): Update

8 years agoFixup previous commit
Justin Burkett [Fri, 19 May 2017 21:37:08 +0000 (17:37 -0400)]
Fixup previous commit

* which-key.el (which-key--compute-binding): Need to copy name of remapped
  command

Fixes #170

8 years agoAdd which-key-compute-remaps option
Justin Burkett [Fri, 19 May 2017 19:48:56 +0000 (15:48 -0400)]
Add which-key-compute-remaps option

* which-key.el (which-key--compute-binding): Add
(which-key--get-current-bindings): Modify to use prev function
(which-key-compute-remaps): Add option

Fixes #169

8 years agoVersion 3.0
Justin Burkett [Tue, 16 May 2017 12:37:06 +0000 (08:37 -0400)]
Version 3.0

8 years agoPrepare for ELPA release
Justin Burkett [Tue, 16 May 2017 12:34:44 +0000 (08:34 -0400)]
Prepare for ELPA release

Update min emacs version to 24.4 to remove backported functions. Remove outdated
comments.

8 years agoAdd .cask to gitignore
Justin Burkett [Tue, 16 May 2017 12:34:01 +0000 (08:34 -0400)]
Add .cask to gitignore

8 years agoUpdate emacs versions for Travis
Justin Burkett [Tue, 16 May 2017 11:35:36 +0000 (07:35 -0400)]
Update emacs versions for Travis

8 years agoMake -init-buffer-hook a custom var
Justin Burkett [Mon, 1 May 2017 12:44:32 +0000 (08:44 -0400)]
Make -init-buffer-hook a custom var

8 years agoAdd option to show transient maps
Justin Burkett [Thu, 27 Apr 2017 00:57:49 +0000 (20:57 -0400)]
Add option to show transient maps

Set which-key-show-transient-maps to a non-nil value to use this feature.

When a transient map is active and it is not a hydra, show the keys from the
map.

Fixes #164

8 years agoImprove which-key--any-match-p
Justin Burkett [Tue, 18 Apr 2017 12:01:40 +0000 (08:01 -0400)]
Improve which-key--any-match-p

9 years agoFix customize type for replacement-alist
Justin Burkett [Fri, 7 Apr 2017 13:05:10 +0000 (09:05 -0400)]
Fix customize type for replacement-alist

Ref #165

9 years agoFix replacement of keys when prefix is nil
Justin Burkett [Wed, 15 Mar 2017 17:55:01 +0000 (13:55 -0400)]
Fix replacement of keys when prefix is nil

The prefix is nil at the top-level keymap

Fixes #163

9 years agoFix handling of key ranges ("a .. d")
Justin Burkett [Thu, 9 Feb 2017 15:27:41 +0000 (10:27 -0500)]
Fix handling of key ranges ("a .. d")

When the last key in the key sequence is a range, extract the whole range
instead of just the final key.

Fixes #161

9 years agoVersion 2.0
Justin Burkett [Tue, 7 Feb 2017 15:55:14 +0000 (10:55 -0500)]
Version 2.0

Increased major version for replacement list changes

9 years agoAdd which-key-show-prefix 'mode-line option
Justin Burkett [Thu, 22 Dec 2016 20:21:37 +0000 (15:21 -0500)]
Add which-key-show-prefix 'mode-line option

See #157

9 years agoUpdate README
Justin Burkett [Tue, 20 Dec 2016 21:03:21 +0000 (16:03 -0500)]
Update README

9 years agoAdd which-key-max-display-columns
Justin Burkett [Tue, 20 Dec 2016 20:56:35 +0000 (15:56 -0500)]
Add which-key-max-display-columns

See #157

9 years agoRemove unused variable
Justin Burkett [Thu, 15 Dec 2016 14:58:32 +0000 (09:58 -0500)]
Remove unused variable

9 years agoFix #156 by allowing multiple replacements
Justin Burkett [Thu, 15 Dec 2016 14:42:08 +0000 (09:42 -0500)]
Fix #156 by allowing multiple replacements

Add which-key-allow-multiple-replacements which can be set to allow multiple
replacements from which-key-replacement-alist to apply to a key binding.

Switch from using assoc-default to find replacements to
which-key--get-replacements.

Adjusts tests and add a new one for multiple replacements.

9 years agoTweak TOC in README and fix a link
Justin Burkett [Mon, 12 Dec 2016 14:04:44 +0000 (09:04 -0500)]
Tweak TOC in README and fix a link

9 years agoAdd a missing type declaration
Justin Burkett [Wed, 7 Dec 2016 15:14:08 +0000 (10:14 -0500)]
Add a missing type declaration

9 years agoPrevent display from occurring twice in a row
Justin Burkett [Mon, 5 Dec 2016 19:09:36 +0000 (14:09 -0500)]
Prevent display from occurring twice in a row

Found some cases where this could happen with a secondary idle delay.

9 years agoAdd basic timing facility for debugging.
Justin Burkett [Mon, 5 Dec 2016 18:55:25 +0000 (13:55 -0500)]
Add basic timing facility for debugging.

9 years agoRemove old obsolete variables/functions
Justin Burkett [Thu, 1 Dec 2016 12:42:32 +0000 (07:42 -0500)]
Remove old obsolete variables/functions

9 years agoAdd some docstrings
Justin Burkett [Thu, 1 Dec 2016 12:39:19 +0000 (07:39 -0500)]
Add some docstrings

9 years agoRemove some unused functions
Justin Burkett [Thu, 1 Dec 2016 12:39:03 +0000 (07:39 -0500)]
Remove some unused functions

9 years agoFixup last commit part 2
Justin Burkett [Thu, 1 Dec 2016 00:09:20 +0000 (19:09 -0500)]
Fixup last commit part 2

9 years agoFixup last commit
Justin Burkett [Thu, 1 Dec 2016 00:03:56 +0000 (19:03 -0500)]
Fixup last commit

9 years agoSupport functions in -add-key-based-replacements
Justin Burkett [Wed, 30 Nov 2016 23:52:52 +0000 (18:52 -0500)]
Support functions in -add-key-based-replacements

9 years agoFix links to users in README
Justin Burkett [Wed, 30 Nov 2016 13:58:53 +0000 (08:58 -0500)]
Fix links to users in README

9 years agoAdd @pdcawley's example to README
Justin Burkett [Wed, 30 Nov 2016 13:56:05 +0000 (08:56 -0500)]
Add @pdcawley's example to README

9 years agoAdd test for #155
Justin Burkett [Wed, 30 Nov 2016 13:39:52 +0000 (08:39 -0500)]
Add test for #155

9 years agoFix bug in last commit
Justin Burkett [Wed, 30 Nov 2016 12:03:52 +0000 (07:03 -0500)]
Fix bug in last commit

The regexp-quote docstring is misleading since (regexp-quote "SPC x") will match
"SPC x c". Added back the beginning and end markers in the regexp.

9 years agoQuote regexp in -add-key-based-replacements
Justin Burkett [Wed, 30 Nov 2016 02:29:32 +0000 (21:29 -0500)]
Quote regexp in -add-key-based-replacements

Should fix #154

9 years agoFix a README link
Justin Burkett [Tue, 29 Nov 2016 18:20:00 +0000 (13:20 -0500)]
Fix a README link

9 years agoNormalize key sequences from -add-key-based-replacements
Justin Burkett [Tue, 29 Nov 2016 13:38:21 +0000 (08:38 -0500)]
Normalize key sequences from -add-key-based-replacements

9 years agoSimplify --format-and-replace
Justin Burkett [Mon, 28 Nov 2016 15:10:18 +0000 (10:10 -0500)]
Simplify --format-and-replace

9 years agoFix use of function in -replacement-alist
Justin Burkett [Fri, 25 Nov 2016 14:00:25 +0000 (09:00 -0500)]
Fix use of function in -replacement-alist

Wasn't actually deleting nil results

9 years agoDon't use case-fold-search in --maybe-replace
Justin Burkett [Fri, 25 Nov 2016 12:56:06 +0000 (07:56 -0500)]
Don't use case-fold-search in --maybe-replace

See https://github.com/syl20bnr/spacemacs/issues/7837#issuecomment-262938480

9 years agoUpdate test
Justin Burkett [Tue, 22 Nov 2016 12:01:09 +0000 (07:01 -0500)]
Update test

9 years agoConsolidate replacements into one alist
Justin Burkett [Tue, 22 Nov 2016 04:03:12 +0000 (23:03 -0500)]
Consolidate replacements into one alist

New list is which-key-replacement-alist. See docstring.

The following lists are deprecated. Some basic backwards compatibility is
attempted, but more complicated configs will likely break.

which-key-key-replacement-alist
which-key-key-based-description-replacement-alist
which-key-description-replacement-alist

which-key-binding-filter-function was removed, since it's functionality is
mostly replaced by which-key-replacement-alist

Updated README

9 years agoMove sort after filter op in --get-formatted-key-bindings
Justin Burkett [Sun, 6 Nov 2016 17:50:55 +0000 (12:50 -0500)]
Move sort after filter op in --get-formatted-key-bindings

9 years agoUpdate comment in --show-buffer-side-window for prior change
Justin Burkett [Mon, 31 Oct 2016 17:56:57 +0000 (13:56 -0400)]
Update comment in --show-buffer-side-window for prior change

9 years agoRemove use of display-buffer-in-major-side-window
Justin Burkett [Mon, 31 Oct 2016 17:48:14 +0000 (13:48 -0400)]
Remove use of display-buffer-in-major-side-window

According to emacs bug #24828, this is an internal function and should
not be used. Following the advice from that report, switch to
display-buffer-in-side-window and add an option for the user to specify
the slot value for that function.

Fixes #146

9 years agoAdd which-key-binding-filter-function
Justin Burkett [Sat, 29 Oct 2016 13:15:03 +0000 (09:15 -0400)]
Add which-key-binding-filter-function

Can be used to arbitrarily manipulate key bindings, including deleting
them, before they are processed by which-key. See docstring for usage.

Fixes #152
https://github.com/syl20bnr/spacemacs/issues/7582

9 years agoAdd sort option -prefix-then-key-order-reverse
Justin Burkett [Sat, 29 Oct 2016 12:34:42 +0000 (08:34 -0400)]
Add sort option -prefix-then-key-order-reverse

Fixes #145

9 years agoAdd global option for how to sort case
Justin Burkett [Sat, 29 Oct 2016 12:33:55 +0000 (08:33 -0400)]
Add global option for how to sort case

which-key-sort-uppercase-first (default t)

See #145

9 years agoMerge pull request #149 from rdotdk/patch-1
Justin Burkett [Tue, 18 Oct 2016 01:35:49 +0000 (21:35 -0400)]
Merge pull request #149 from rdotdk/patch-1

fix link

9 years agofix link
Hariharan R [Sun, 16 Oct 2016 06:18:23 +0000 (02:18 -0400)]
fix link

9 years agoFix test for recent prefix-name change
Justin Burkett [Wed, 5 Oct 2016 20:32:29 +0000 (16:32 -0400)]
Fix test for recent prefix-name change

9 years agoMake 458c8d9 backwards compatible
Justin Burkett [Wed, 5 Oct 2016 18:54:49 +0000 (14:54 -0400)]
Make 458c8d9 backwards compatible

The prefix titles need to be in cons cells to stay consistent with how
they were used before.

9 years agoMove a function for the compiler
Justin Burkett [Wed, 5 Oct 2016 18:42:10 +0000 (14:42 -0400)]
Move a function for the compiler

9 years agoConsolidate prefix names and key-based replacements
Justin Burkett [Wed, 5 Oct 2016 18:24:11 +0000 (14:24 -0400)]
Consolidate prefix names and key-based replacements

Make obsolete several redundant functions, the most important of which
is which-key-declare-prefixes. This is just an alias for
which-key-add-key-based-replacements now. The additional functionality
that declare-prefixes had (for declaring prefix titles) is now rolled
into the add-key-based-replacements function. See that functions doc
string.

9 years agoFix -maybe-get-prefix-title use of key-binding
Justin Burkett [Tue, 4 Oct 2016 20:48:40 +0000 (16:48 -0400)]
Fix -maybe-get-prefix-title use of key-binding

key-binding doesn't work with all forms of key strings.

See #143

9 years agoResize popup when frame resized
justbur [Sun, 11 Sep 2016 19:58:53 +0000 (15:58 -0400)]
Resize popup when frame resized

Fixes #139

9 years agoMerge pull request #137 from tarsius/outlines
Justin Burkett [Wed, 31 Aug 2016 23:55:26 +0000 (19:55 -0400)]
Merge pull request #137 from tarsius/outlines

Follow conventions for section headers

9 years agoMerge pull request #136 from tarsius/fixup
Justin Burkett [Wed, 31 Aug 2016 23:55:03 +0000 (19:55 -0400)]
Merge pull request #136 from tarsius/fixup

Move definition of which-key--local-binding-p

9 years agoFollow conventions for section headers
Jonas Bernoulli [Wed, 31 Aug 2016 23:26:10 +0000 (01:26 +0200)]
Follow conventions for section headers

Doing so allows the use of `outline-minor-mode' makes it possible
to navigate sections similarly to how that is done in `org-mode'.

9 years agoMove definition of which-key--local-binding-p
Jonas Bernoulli [Wed, 31 Aug 2016 12:41:41 +0000 (14:41 +0200)]
Move definition of which-key--local-binding-p

It has to be defined after the inline functions which it uses.

9 years agoVersion 1.1.15
Justin Burkett [Wed, 17 Aug 2016 15:17:45 +0000 (11:17 -0400)]
Version 1.1.15

9 years agoAdd note about setting delay to zero
Justin Burkett [Wed, 17 Aug 2016 15:17:16 +0000 (11:17 -0400)]
Add note about setting delay to zero

9 years agoFix minibuffer echo not displaying
Justin Burkett [Wed, 17 Aug 2016 15:11:56 +0000 (11:11 -0400)]
Fix minibuffer echo not displaying

See #133

9 years agoVersion 1.1.14
justbur [Thu, 28 Jul 2016 13:20:20 +0000 (09:20 -0400)]
Version 1.1.14

Tagged wrong commit

9 years agoDisable hack for echo area
justbur [Thu, 28 Jul 2016 13:17:19 +0000 (09:17 -0400)]
Disable hack for echo area

Seems to cause more problems (like completion commands sometimes being
overwritten) than it solves.

9 years agoFix Makefile
justbur [Wed, 27 Jul 2016 13:22:38 +0000 (09:22 -0400)]
Fix Makefile

9 years agoAdd allow-imprecise-window-fit option
justbur [Sat, 9 Jul 2016 19:25:50 +0000 (15:25 -0400)]
Add allow-imprecise-window-fit option

Possible fix for #130

When enabled this option avoids the use of fit-window-to-buffer to
resize the popup. My profiling suggested that emacs was spending a lot
of time in this function (and hanging sometimes) with different fonts. I
noticed this with Roboto Mono on MSWindows, which should explain #130.

9 years agoExplicitly set tab-width when collecting bindings
justbur [Wed, 6 Jul 2016 19:16:40 +0000 (15:16 -0400)]
Explicitly set tab-width when collecting bindings

For some reason indent-tabs-mode doesn't use tabs with strange
tab-widths.

See https://github.com/syl20bnr/spacemacs/issues/6497

9 years agoFix previous commit
justbur [Tue, 5 Jul 2016 13:05:47 +0000 (09:05 -0400)]
Fix previous commit

9 years agoAdd whitelist and blacklist options
justbur [Tue, 5 Jul 2016 12:58:40 +0000 (08:58 -0400)]
Add whitelist and blacklist options

which-key-allow-regexps is a list of regexps that allow the popup when
one is matched

which-key-inhibit-regexps inhibits the popup when one regexp matches

The string matched against is the current key sequence as produced by
key-description.

Fixes #129

9 years agoRemove setup code
justbur [Fri, 17 Jun 2016 12:42:18 +0000 (08:42 -0400)]
Remove setup code

It's no longer necessary and makes changing echo-keystrokes annoying.

9 years agoMake current-prefix nil when not showing popup
justbur [Thu, 16 Jun 2016 15:01:53 +0000 (11:01 -0400)]
Make current-prefix nil when not showing popup

9 years agoUse sit-for instead of timer for delay functions
justbur [Thu, 16 Jun 2016 14:03:51 +0000 (10:03 -0400)]
Use sit-for instead of timer for delay functions